package com.base.mapper.voipmapper;

import com.base.po.voip.SelfShopWithdrawals;
import com.base.po.voip.SelfShopWithdrawalsExample;
import com.base.utils.Page;

import java.math.BigDecimal;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface SelfShopWithdrawalsMapper {
    int countByExample(SelfShopWithdrawalsExample example);

    int deleteByExample(SelfShopWithdrawalsExample example);

    int insert(SelfShopWithdrawals record);

    int insertSelective(SelfShopWithdrawals record);

    List<SelfShopWithdrawals> selectByExample(SelfShopWithdrawalsExample example);
    
    List<SelfShopWithdrawals> selectWithdrawals(@Param("parentid") String parentid, @Param("shopid") String shopid);
    
    List<SelfShopWithdrawals> selectByAll(@Param("page") Page page, @Param("parentid") String parentid,
                                          @Param("shopid") String shopid, @Param("shopname") String shopname,
                                          @Param("name") String name, @Param("accountnum") String accountnum,
                                          @Param("status") Byte status);
    
    SelfShopWithdrawals selectByPrimaryKey(String id);

    int updateByExampleSelective(@Param("record") SelfShopWithdrawals record, @Param("example") SelfShopWithdrawalsExample example);

    int updateByExample(@Param("record") SelfShopWithdrawals record, @Param("example") SelfShopWithdrawalsExample example);
    
    int updateByPrimaryKeySelective(SelfShopWithdrawals record);
    
    int countByAll(@Param("parentid") String parentid, @Param("shopid") String shopid,
                   @Param("shopname") String shopname, @Param("name") String name,
                   @Param("accountnum") String accountnum, @Param("status") Byte status);

    //提现了多少
    BigDecimal sumAllCash(@Param("parentid") String parentid, @Param("shopid") String shopid);
}